﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using VehicleMaintenance.Comm;

namespace VehicleMaintenance.Models
{
	public class MainBill
	{
		[Key]
		public int ID { get; set; }

		[Display(Name = "主单号")]
		[Required(ErrorMessage = "主单号不能为空")]
		public string MainBillCode { get; set; }

		[Display(Name = "车牌号")]
		[Required(ErrorMessage = "车牌号不能为空")]
		public string CarNO { get; set; }

		[Display(Name = "车辆名称")]
		[Required(ErrorMessage = "车辆名称不能为空")]
		public int CarID { get; set; }

		[Display(Name = "维修类别")]
		[Required(ErrorMessage = "维修类别不能为空")]
		public int CategoryID { get; set; }

		//[Display(Name = "开始修理日期")]
		[ControlTypeAttribute(Type = "DateTimePicker")]
		public string BeginDate { get; set; }

		//[Display(Name = "修理完成日期")]
		[ControlTypeAttribute(Type = "DateTimePicker")]
		public string FinishDate { get; set; }

		[Display(Name = "当前修理状态")]
		[ControlTypeAttribute(Type = "ComboBox", Values = new string[] { "已登记", "修理中", "已完成" })]
		public string State { get; set; }

		[Display(Name = "备注")]
		public string Remark { get; set; }

		/// <summary>
		/// 是否结算
		/// </summary>
		public int IsSettle { get; set; }

		public CarInfo Car { get; set; }

		public MaintenanceCategories MaintenanceCategories { get; set; }
		//public List<RecipientsBill> RecipientsBills { get; set; }
	}
}
